package com.jy.project.enums;

public enum ApplyTypeMatericalEnum {
    QUALITY(10, "ZL"),
    COLLECT(20, "LY"),
    STOCK_RETURN(30, "TK"),
    BORROW(40, "JC"),
    RENEW(50, "XJ"),
    RETURN( 60, "GH"),
    INSERT_MATERIAL( 70, "WZ"),
    HANDOVERL( 80, "JZ"),
    SYSTEM_QUALITY(10, "SYS-ZL"),
    SYSTEM_COLLECT(20, "SYS-LY"),
    SYSTEM_STOCK_RETURN(30, "SYS-TK"),
    SYSTEM_BORROW(40, "SYS-JC"),
    SYSTEM_RENEW(50, "SYS-XJ"),
    SYSTEM_RETURN( 60, "SYS-GH"),
    SYSTEM_INSERT_MATERIAL( 70, "SYS-WZ"),
    SYSTEM_HANDOVERL( 80, "SYS-JZ"),
    ;
    private Integer code;


    private String value;

    ApplyTypeMatericalEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }


    public static  String getValue(Integer code){
        for (ApplyTypeMatericalEnum value : values()) {
            if (value.getCode().equals(code)){
                return  value.getValue();
            }
        }
        return null;
    }
}
